import fetch from '@/utils/fetch'

export function getCollectParaList(params) {
	return fetch({
	    url: '/device/v1/mgt/dev_para',
	    method: 'get',
	    params
  	})
}

export function getCollectParaDetail(id) {
	return fetch({
	    url: `/device/v1/mgt/dev_para/${id}`,
	    method: 'get'
  	})
}

export function createCollectPara(data) {
	return fetch({
		url: '/device/v1/mgt/dev_para',
		method: 'post',
		data
	})
}

export function modifyCollectPara(id, data) {
	return fetch({
	    url: `/device/v1/mgt/dev_para/${id}`,
	    method: 'patch',
	    data
	})
}

export const paraTypeList = { //采集参数类型字段说明
	1: "温度",
	2: "湿度",
	3: "水浸报警",
	4: "烟感报警",
	5: "水箱水位",
	6: "水箱超高水位报警",
	7: "水箱超低水位报警"
};

export const paraTypeIconList = {
1: '/static/images/sbyxzt/temperature',
2: '/static/images/sbyxzt/humidity',
3: '/static/images/sbyxzt/waterlogging',
4: '/static/images/sbyxzt/smoke',
59	    :"/static/images/sbyxzt/dev_para/Spray_glitch",
32		:"/static/images/sbyxzt/dev_para/Spray_pump",
33	    :"/static/images/sbyxzt/dev_para/Pressure_spray",
30	    :"/static/images/sbyxzt/dev_para/Indoor_pump",
31	    :"/static/images/sbyxzt/dev_para/Indoor_pump",
60	    :"/static/images/sbyxzt/dev_para/Indoor_pump",
62	    :"/static/images/sbyxzt/dev_para/Indoor_pump",
63	    :"/static/images/sbyxzt/dev_para/Indoor_glitch",
64	    :"/static/images/sbyxzt/dev_para/Indoor_pump",
61	    :"/static/images/sbyxzt/dev_para/Indoor_glitch",
5	    :"/static/images/sbyxzt/dev_para/Level",
89	    :"/static/images/sbyxzt/dev_para/Fire_alarm",
90	    :"/static/images/sbyxzt/dev_para/Fire_fault",
91	    :"/static/images/sbyxzt/dev_para/Fire_linkage",
45	    :"/static/images/sbyxzt/dev_para/ball",
92	    :"/static/images/sbyxzt/dev_para/Entrance",
20	    :"/static/images/sbyxzt/dev_para/Temperature",
21	    :"/static/images/sbyxzt/dev_para/Temperature",
22	    :"/static/images/sbyxzt/dev_para/Temperature",
14	    :"/static/images/sbyxzt/dev_para/Voltage",
16	    :"/static/images/sbyxzt/dev_para/Voltage",
12	    :"/static/images/sbyxzt/dev_para/Voltage",
25	    :"/static/images/sbyxzt/dev_para/Power",
23	    :"/static/images/sbyxzt/dev_para/P_electricity",
24	    :"/static/images/sbyxzt/dev_para/Q_electricity",
78	    :"/static/images/sbyxzt/dev_para/Transformer",
88	    :"/static/images/sbyxzt/dev_para/Transformer_temperature",
27	    :"/static/images/sbyxzt/dev_para/State",
83	    :"/static/images/sbyxzt/dev_para/Temperature",
84	    :"/static/images/sbyxzt/dev_para/Speed",
29	    :"/static/images/sbyxzt/dev_para/Oil",
85	    :"/static/images/sbyxzt/dev_para/Temperature",
28	    :"/static/images/sbyxzt/dev_para/Battery",
15	    :"/static/images/sbyxzt/dev_para/Voltage",
11	    :"/static/images/sbyxzt/dev_para/Voltage",
13	    :"/static/images/sbyxzt/dev_para/Voltage",
17	    :"/static/images/sbyxzt/dev_para/Current",
18	    :"/static/images/sbyxzt/dev_para/Current",
19	    :"/static/images/sbyxzt/dev_para/Current",
44	    :"/static/images/sbyxzt/dev_para/Electricity",
86	    :"/static/images/sbyxzt/dev_para/Level",
81	    :"/static/images/sbyxzt/dev_para/Voltage",
82	    :"/static/images/sbyxzt/dev_para/Current",
87	    :"/static/images/sbyxzt/dev_para/Elevator_speed",
36	    :"/static/images/sbyxzt/dev_para/Elevator_floor",
97	    :"/static/images/sbyxzt/dev_para/Elevator",
98	    :"/static/images/sbyxzt/dev_para/Elevator_door",
99	    :"/static/images/sbyxzt/dev_para/Elevator",
100	    :"/static/images/sbyxzt/dev_para/Elevator_dooroutside",
101	    :"/static/images/sbyxzt/dev_para/Elevator_header",
102	    :"/static/images/sbyxzt/dev_para/Elevator_bottom",
103	    :"/static/images/sbyxzt/dev_para/Elevator_run",
104	    :"/static/images/sbyxzt/dev_para/Elevator_overspeed",
105	    :"/static/images/sbyxzt/dev_para/Elevator_walking",
106	    :"/static/images/sbyxzt/dev_para/Elevator_outages",
107	    :"/static/images/sbyxzt/dev_para/Elevator_flatlayer",
108	    :"/static/images/sbyxzt/dev_para/Elevator_noflatlayer",
109	    :"/static/images/sbyxzt/dev_para/Elevator_network",
110	    :"/static/images/sbyxzt/dev_para/Elevator_online",
111	    :"/static/images/sbyxzt/dev_para/Elevator_battery",
112	    :"/static/images/sbyxzt/dev_para/Elevator_people",
113	    :"/static/images/sbyxzt/dev_para/Level",
79	    :"/static/images/sbyxzt/dev_para/Elevator_electric"

};

export const alarmLevelList = {
	0: "正常",
	1: "告警",
    2: "严重告警"
}